Conversation
Add an independent SHA512 verification step to the release sync workflow that re-downloads the GitHub release archive and recomputes the digest before the reusable sync workflow commits a new portfile to the vcpkg overlay registry. The reusable sync workflow at kcenon/common_system already performs this check internally (see kcenon/common_system#675, PR #676), but adding a caller-side verify-archive job in this repo guards against drift if the reusable workflow changes or is repointed in the future. Implementation notes: - File-based hashing (curl -o file, then sha512sum) instead of piping curl into sha512sum, so a 404 cannot silently produce the empty-input hash cf83e1357eefb8bdf... - Explicit empty-input SHA512 sentinel guard - Archive size sanity check (>= 1024 bytes) - sync job depends on verify-archive via needs:, so a failed verification halts the registry update before any commit Audit summary: - on-release-sync-registry.yml: hardened (this PR) - All other workflows in this repo (ci.yml, sanitizers.yml, benchmarks.yml, etc.): do not compute or write SHA512 to portfiles, no change needed. Closes #687 Part of kcenon/common_system#674
This was referenced May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #687
Part of kcenon/common_system#674.
What
Adds an independent SHA512 verification step to
.github/workflows/on-release-sync-registry.yml. The newverify-archivejob re-downloads the GitHub release archive fromhttps://github.com/kcenon/monitoring_system/archive/refs/tags/<tag>.tar.gz, recomputes its SHA512, and runs before the existingsyncjob that calls the reusable workflow atkcenon/common_system/.github/workflows/sync-vcpkg-registry.yml@main.Why
Detected via microsoft/vcpkg#51511 and kcenon/vcpkg-registry#87 - every kcenon port shipped a mismatched SHA512 because release workflows never compared the computed value against the actual archive. Cold-cache vcpkg consumers (new CI runners, fresh users) hit 100% install failure when the SHA in
vcpkg-registry/ports/kcenon-monitoring-system/portfile.cmakedoes not match the bytes the consumer actually fetches.The reusable sync workflow at
kcenon/common_systemwas already hardened in kcenon/common_system PR #676, somonitoring_systeminherits that check via theuses:reference. Adding a caller-side verification job in this repo provides defense-in-depth: if the reusable workflow is ever repointed, refactored, or its check is removed, this repo's release pipeline still fails fast on a bad archive.Where
.github/workflows/on-release-sync-registry.ymlverify-archivejob added beforesync;syncnow declaresneeds: verify-archiveAudit summary (other workflows considered)
on-release-sync-registry.ymlci.ymlsanitizers.ymlbenchmarks.ymlcoverage.ymlcve-scan.yml,dependency-security-scan.yml,osv-scanner.yml,sbom.ymlstatic-analysis.yml,integration-tests.yml,doc-audit.yml,build-Doxygen.yamlvalidate-vcpkg-chain.ymlOnly
on-release-sync-registry.ymlparticipates in writing SHA512 to portfiles, so a single inline verification job in that workflow is appropriate. No composite action extraction is needed.How
The new
verify-archivejob runs onubuntu-latestand:curl -fsSL --retry 3 --retry-delay 2 -o <file> <url>(file-based, never piped intosha512sum).sha512sumof the file.cf83e1357eefb8bdf...), which would indicate a silent fetch failure.syncjob declaresneeds: verify-archive, so a failed verification short-circuits the registry update before any portfile commit.The reusable sync workflow at
kcenon/common_systemperforms the same comparison server-side using the SHA it just wrote to the portfile, providing two-layer protection.Test Plan
How a reviewer can validate the new job fires
v0.x.y). TheSync Registry on Releaseworkflow triggers automatically.Verify release archive SHA512job. On a healthy release, it prints:syncjob then runs only ifverify-archivesucceeded.Negative-path verification
To confirm the guard fires on a bad archive URL, a maintainer can temporarily replace the
TAGenv value in the workflow with a non-existent tag on a feature branch and trigger the workflow against a synthetic release - theverify-archivejob will fail with::error::Failed to download release archive, and thesyncjob will be skipped.Acceptance Criteria
on-release-sync-registry.ymlonly)curl | sha512sum) so 404s cannot produce the empty-input sentinel hashReferences